package com.junfeng.pet2048.controller;


import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;

@Controller
public class LoginController {
    @GetMapping({"/","/login"})
    public String login(){
        return "login";
    }

    @PostMapping("/doLogin")
    public String doLogin(String uname, String password, Model model){
        model.addAttribute("uname",uname);
        return "index";
    }

}